// 接口元数据

// 上线置空
// const ipAddress = ''
// export const url = ''

// const ipAddress = 'http://192.168.31.49'
// export const url = 'http://192.168.31.49'

const ipAddress = 'http://192.168.31.6:9003'
export const url = 'http://192.168.31.6:9003'


import api from './http'



// 登录
export const loginApi = (params) => api.post(ipAddress + '/v1/admin/login', params) // 登录
// export const logOutAndLogIn = (params) => api.post(ipAddress + '/admin/AdminUser/logout', params) // 退出登录
export const obtainVerificationCode = (params) => api.post(ipAddress + '/admin/AdminUser/captcha', params) // 验证码


// 菜单
export const menuBar = () => api.get(ipAddress + '/v1/admin/menu') // 菜单列表
export const menuEditing = (params) => api.post(ipAddress + '/admin/AdminMenu/upd', params) // 菜单编辑



// 上传图片并返回图片地址
export const upload_pictures = (params) => api.post(ipAddress + '/v1/admin/upload-img', params) // 上传图片
export const urlupload = ipAddress + '/v1/admin/upload-img'

//管理员
export const adminList = (params) => api.get(ipAddress + `/v1/admin/admin${params}`) // 管理员列表
export const administratorAdded = (params) => api.post(ipAddress + '/v1/admin/admin', params) // 管理员新增
export const administratorEditor = (params) => api.put(ipAddress + `/v1/admin/admin/${params.id}`, params) // 管理员编辑
export const administratorDelete = (params) => api.delete(ipAddress + `/v1/admin/admin/${params}`) // 管理员删除


//管理员分组
export const administratorGroupList = (params) => api.get(ipAddress + `/v1/admin/groups${params}`) // 管理员分组列表
export const addAdministratorGroup = (params) => api.post(ipAddress + '/v1/admin/groups', params) // 管理员分组新增
export const administratorGroupEditing = (params) => api.put(ipAddress + `/v1/admin/groups/${params.id}`, params) // 管理员分组编辑
export const administratorGroupDeletion = (params) => api.delete(ipAddress + `/v1/admin/groups/${params}`) // 管理员分组删除


// 用户
export const user_list = (params) => api.get(ipAddress + `/v1/admin/user${params}`) // 用户列表
export const user_addition = (params) => api.post(ipAddress + '/v1/admin/user', params) // 用户新增
export const user_editing = (params) => api.put(ipAddress + `/v1/admin/user/${params.id}`, params) // 用户编辑
export const user_deletion = (params) => api.delete(ipAddress + `/v1/admin/user/${params}`) // 用户删除


// 用户银行卡
export const list_of_user_bank_cards = (params) => api.get(ipAddress + `/v1/admin/user-bank-card${params}`) // 用户银行卡列表
export const user_bank_card_addition = (params) => api.post(ipAddress + '/v1/admin/user-bank-card', params) // 用户银行卡新增
export const user_bank_card_editing = (params) => api.put(ipAddress + `/v1/admin/user-bank-card/${params.id}`, params) // 用户银行卡编辑
export const delete_users_bank_card = (params) => api.delete(ipAddress + `/v1/admin/user-bank-card/${params}`) // 用户银行卡删除


// 用户分组
export const user_group_list = (params) => api.get(ipAddress + `/v1/admin/user-groups${params}`) // 用户分组列表
export const user_group_addition = (params) => api.post(ipAddress + '/v1/admin/user-groups', params) // 用户分组新增
export const user_group_editing = (params) => api.put(ipAddress + `/v1/admin/user-groups/${params.id}`, params) // 用户分组编辑
export const user_group_deletion = (params) => api.delete(ipAddress + `/v1/admin/user-groups/${params}`) // 用户分组删除


// 用户积分
export const user_points_list = (params) => api.get(ipAddress + `/v1/admin/user-points${params}`) // 用户积分列表
export const add_user_points = (params) => api.post(ipAddress + '/v1/admin/user-points', params) // 用户积分新增
export const user_points_editing = (params) => api.put(ipAddress + `/v1/admin/user-points/${params.id}`, params) // 用户积分编辑
export const delete_user_points = (params) => api.delete(ipAddress + `/v1/admin/user-points/${params}`) // 用户积分删除


// 用户积分兑换
export const user_points_redemption_list = (params) => api.get(ipAddress + `/v1/admin/user-points-exchange${params}`) // 用户积分兑换列表
export const new_user_point_redemption = (params) => api.post(ipAddress + '/v1/admin/user-points-exchange', params) // 用户积分兑换新增
export const user_point_redemption_editor = (params) => api.put(ipAddress + `/v1/admin/user-points-exchange/${params.id}`, params) // 用户积分兑换编辑
export const delete_user_point_redemption = (params) => api.delete(ipAddress + `/v1/admin/user-points-exchange/${params}`) // 用户积分兑换删除


// 用户实名
export const user_real_name_list = (params) => api.get(ipAddress + `/v1/admin/user-realname${params}`) // 用户实名列表
export const user_real_name_addition = (params) => api.post(ipAddress + '/v1/admin/user-realname', params) // 用户实名新增
export const user_real_name_editing = (params) => api.put(ipAddress + `/v1/admin/user-realname/${params.id}`, params) // 用户实名编辑
export const user_real_name_deletion = (params) => api.delete(ipAddress + `/v1/admin/user-realname/${params}`) // 用户实名删除


// 用户状态
export const user_status_list = (params) => api.get(ipAddress + `/v1/admin/user-status${params}`) // 用户状态列表
export const user_status_editing = (params) => api.put(ipAddress + `/v1/admin/user-status/${params.id}`, params) // 用户状态编辑


// 用户钱包
export const user_wallet_list = (params) => api.get(ipAddress + `/v1/admin/user-wallet${params}`) // 用户钱包列表
export const user_wallet_editor = (id, params) => api.put(ipAddress + `/v1/admin/user-wallet/${id}`, params) // 用户钱包编辑

// 提现订单
export const withdrawal_order_list = (params) => api.get(ipAddress + `/v1/admin/withdrawal-orders${params}`) // 提现订单列表
export const withdrawal_order_editing = (id, params) => api.put(ipAddress + `/v1/admin/withdrawal-orders/${id}`, params) // 提现订单编辑



// 充值订单
export const recharge_order_list = (params) => api.get(ipAddress + `/v1/admin/recharge-orders${params}`) // 充值订单列表
export const recharge_order_editing = (params) => api.put(ipAddress + `/v1/admin/recharge-orders/${params.id}`, params) // 充值订单编辑


// 用户资金流水
export const user_fund_flow_list = (params) => api.get(ipAddress + `/v1/admin/user-funds-flow${params}`) // 用户资金流水列表
export const user_fund_flow_editing = (id, params) => api.put(ipAddress + `/v1/admin/user-funds-flow/${id}`, params) // 用户资金流水编辑


// 支付地址
export const payment_address_list = (params) => api.get(ipAddress + `/v1/admin/payment-addresses${params}`) // 支付地址列表
export const add_payment_address = (params) => api.post(ipAddress + '/v1/admin/payment-addresses', params) // 支付地址新增
export const payment_address_editing = (id, params) => api.put(ipAddress + `/v1/admin/payment-addresses/${id}`, params) // 支付地址编辑
export const delete_payment_address = (params) => api.delete(ipAddress + `/v1/admin/payment-addresses/${params}`) // 支付地址删除


// 股票
export const stock_list = (params) => api.get(ipAddress + `/v1/admin/stock${params}`) // 股票列表
export const stock_addition = (params) => api.post(ipAddress + '/v1/admin/stock', params) // 股票新增
export const stock_editor = (params) => api.put(ipAddress + `/v1/admin/stock/${params.id}`, params) // 股票编辑
export const stock_deletion = (params) => api.delete(ipAddress + `/v1/admin/stock/${params}`) // 股票删除


// 模块
export const module_list = (params) => api.get(ipAddress + `/v1/admin/template${params}`) // 模块列表
export const module_addition = (params) => api.post(ipAddress + '/v1/admin/template', params) // 模块新增
export const module_editing = (params) => api.put(ipAddress + `/v1/admin/template/${params.id}`, params) // 模块编辑
export const module_deletion = (params) => api.delete(ipAddress + `/v1/admin/template/${params}`) // 模块删除


// 模版
export const template_list = (params) => api.get(ipAddress + `/v1/admin/template-detail${params}`) // 模版列表
export const template_addition = (params) => api.post(ipAddress + '/v1/admin/template-detail', params) // 模版新增
export const template_editing = (id, params) => api.put(ipAddress + `/v1/admin/template-detail/${id}`, params) // 模版编辑
export const template_deletion = (params) => api.delete(ipAddress + `/v1/admin/template-detail/${params}`) // 模版删除


// U盾地址
export const u_shield_address_list = (params) => api.get(ipAddress + `/v1/admin/user-ushield-address${params}`) // U盾地址列表
export const add_u_shield_address = (params) => api.post(ipAddress + '/v1/admin/user-ushield-address', params) // U盾地址新增
export const ushield_address_editing = (params) => api.put(ipAddress + `/v1/admin/user-ushield-address/${params.id}`, params) // U盾地址编辑
export const u_shield_address_deletion = (params) => api.delete(ipAddress + `/v1/admin/user-ushield-address/${params}`) // U盾地址删除


// 新闻
export const news_list = (params) => api.get(ipAddress + `/v1/admin/news${params}`) // 新闻列表
export const new_news_added = (params) => api.post(ipAddress + '/v1/admin/news', params) // 新闻新增
export const news_editor = (id, params) => api.put(ipAddress + `/v1/admin/news/${id}`, params) // 新闻编辑
export const news_deletion = (params) => api.delete(ipAddress + `/v1/admin/news/${params}`) // 新闻删除


// 积分商品
export const list_of_points_based_products = (params) => api.get(ipAddress + `/v1/admin/points-exchange${params}`) // 积分商品列表
export const new_point_based_products_added = (params) => api.post(ipAddress + '/v1/admin/points-exchange', params) // 积分商品新增
export const integral_product_editing = (params) => api.put(ipAddress + `/v1/admin/points-exchange/${params.id}`, params) // 积分商品编辑
export const point_based_product_deletion = (params) => api.delete(ipAddress + `/v1/admin/points-exchange/${params}`) // 积分商品删除


// 持仓订单
export const position_order_list = (params) => api.get(ipAddress + `/v1/admin/holding-order${params}`) // 持仓订单列表
export const newly_added_position_orders = (params) => api.post(ipAddress + '/v1/admin/holding-order', params) // 持仓订单新增
export const position_order_editing = (params) => api.put(ipAddress + `/v1/admin/holding-order/${params.id}`, params) // 持仓订单编辑
export const position_order_deletion = (params) => api.delete(ipAddress + `/v1/admin/holding-order/${params}`) // 持仓订单删除



// 系统设置
export const system_settings_list = (params) => api.get(ipAddress + `/v1/admin/configs${params}`) // 系统设置列表
export const system_settings_editing = (key, params) => api.put(ipAddress + `/v1/admin/configs/${key}`, params) // 系统设置编辑


// OTC
export const otc_list = (params) => api.get(ipAddress + `/v1/admin/otc${params}`) // OTC列表
export const otc_addition = (params) => api.post(ipAddress + '/v1/admin/otc', params) // OTC新增
export const otc_editor = (id, params) => api.put(ipAddress + `/v1/admin/otc/${id}`, params) // OTC编辑
export const otc_deletion = (params) => api.delete(ipAddress + `/v1/admin/otc/${params}`) // OTC删除

// OTC订单
export const otc_order_list = (params) => api.get(ipAddress + `/v1/admin/otc${params}`) // OTC订单列表



// IPO申购
export const ipo_stock_list = (params) => api.get(ipAddress + `/v1/admin/stock-subscribe${params}`) // IPO申购列表
export const ipo_stock_add = (params) => api.post(ipAddress + '/v1/admin/stock-subscribe', params) // IPO申购新增
export const ipo_stock_edit = (id, params) => api.put(ipAddress + `/v1/admin/stock-subscribe/${id}`, params) // IPO申购编辑
export const ipo_stock_delete = (params) => api.delete(ipAddress + `/v1/admin/stock-subscribe/${params}`) // IPO申购删除


// IPO日历
export const ipo_calendar_list = (params) => api.get(ipAddress + `/v1/admin/stock-calendar${params}`) // IPO日历列表
export const ipo_calendar_added = (params) => api.post(ipAddress + '/v1/admin/stock-calendar', params) // IPO日历新增
export const ipo_calendar_editor = (id, params) => api.put(ipAddress + `/v1/admin/stock-calendar/${id}`, params) // IPO日历编辑
export const ipo_calendar_deletion = (params) => api.delete(ipAddress + `/v1/admin/stock-calendar/${params}`) // IPO日历删除


// IPO订单
export const ipo_order_list = (params) => api.get(ipAddress + `/v1/admin/stock-subscribe-order${params}`) // IPO订单列表
export const ipo_order_editing = (id, params) => api.put(ipAddress + `/v1/admin/stock-subscribe-order/${id}`, params) // IPO订单编辑


// 消息通知
export const message_notification_list = (params) => api.get(ipAddress + `/v1/admin/message${params}`) // 消息通知列表
export const message_notification_added = (params) => api.post(ipAddress + '/v1/admin/message', params) // 消息通知新增
export const message_notification_editor = (id, params) => api.put(ipAddress + `/v1/admin/message/${id}`, params) // 消息通知编辑
export const message_notification_deletion = (params) => api.delete(ipAddress + `/v1/admin/message/${params}`) // 消息通知删除